<template>
	<view class="shop-pone">
		
		<view class="pone-item" @click="changeMobile(String(shopdata.mobile))">
			<u-icon name="phone-fill" color="#45BC1B" size="30"></u-icon>
			<text>{{$t('Phone')}}</text>
		</view>
		<view class="pone-item" @click="copy(shopdata.wechat)">
			<u-icon name="weixin-fill" color="#45BC1B" size="30"></u-icon>
			<text>{{$t('Wechat')}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"Contact",
		props:['shopdata'],
		data() {
			return {
				
			};
		},
		methods:{
			changeMobile(mobile) {
				uni.makePhoneCall({
					phoneNumber: mobile
				})
			
			},
			
			copy(value){
				
			  uni.setClipboardData({
			    data:value,//要被复制的内容
			    success:()=>{//复制成功的回调函数
			      uni.showToast({//提示
			        title:this.$t('ReplicationSuccessful')
			      })
			    }
			  });
			}
		}
	}
</script>

<style lang="scss">
.shop-pone {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-around;
			padding: 20rpx 20rpx;
			box-sizing: border-box;
			padding-bottom: 200rpx;
			
			.pone-item {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				font-size: $uni-font-size-paragraph;

				text {
					padding-top: 20rpx;
				}
			}
		}
</style>